home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Utilities / Ghostscript / src / gdevmrop.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-01-01  |  3.1 KB  |  86 lines

  1. /* Copyright (C) 1995, 2000 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of AFPL Ghostscript.
  4.   
  5.   AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author or
  6.   distributor accepts any responsibility for the consequences of using it, or
  7.   for whether it serves any particular purpose or works at all, unless he or
  8.   she says so in writing.  Refer to the Aladdin Free Public License (the
  9.   "License") for full details.
  10.   
  11.   Every copy of AFPL Ghostscript must include a copy of the License, normally
  12.   in a plain ASCII text file named PUBLIC.  The License grants you the right
  13.   to copy, modify and redistribute AFPL Ghostscript, but only under certain
  14.   conditions described in the License.  Among other things, the License
  15.   requires that the copyright notice and this notice be preserved on all
  16.   copies.
  17. */
  18.  
  19. /*$Id: gdevmrop.h,v 1.3 2000/09/19 19:00:14 lpd Exp $ */
  20. /* Definitions for device RasterOp implementations. */
  21. /* Requires gxdevmem.h, gsropt.h */
  22.  
  23. #ifndef gdevmrop_INCLUDED
  24. #  define gdevmrop_INCLUDED
  25.  
  26. /*
  27.  * Compute the effective RasterOp for the 1-bit case,
  28.  * taking transparency into account.
  29.  */
  30. gs_rop3_t gs_transparent_rop(P1(gs_logical_operation_t lop));
  31.  
  32. #ifdef DEBUG
  33. /* Trace a [strip_]copy_rop call. */
  34. void trace_copy_rop(P16(const char *cname, gx_device * dev,
  35.             const byte * sdata, int sourcex, uint sraster,
  36.             gx_bitmap_id id, const gx_color_index * scolors,
  37.             const gx_strip_bitmap * textures,
  38.             const gx_color_index * tcolors,
  39.             int x, int y, int width, int height,
  40.             int phase_x, int phase_y, gs_logical_operation_t lop));
  41. #endif
  42.  
  43. /*
  44.  * PostScript colors normally act as the texture for RasterOp, with a null
  45.  * (all zeros) source.  For images with CombineWithColor = true, we need
  46.  * a way to use the image data as the source.  We implement this with a
  47.  * device that applies RasterOp with a specified texture to drawing
  48.  * operations, treating the drawing color as source rather than texture.
  49.  * The texture is a gx_device_color; it may be any type of color, even a
  50.  * pattern.
  51.  */
  52. #ifndef gx_device_color_DEFINED
  53. #  define gx_device_color_DEFINED
  54. typedef struct gx_device_color_s gx_device_color;
  55. #endif
  56.  
  57. #ifndef gx_device_rop_texture_DEFINED
  58. #  define gx_device_rop_texture_DEFINED
  59. typedef struct gx_device_rop_texture_s gx_device_rop_texture;
  60. #endif
  61.  
  62. struct gx_device_rop_texture_s {
  63.     gx_device_forward_common;
  64.     gs_logical_operation_t log_op;
  65.     gx_device_color texture;
  66. };
  67.  
  68. #define private_st_device_rop_texture()    /* in gdevrops.c */\
  69.   gs_private_st_composite_use_final(st_device_rop_texture,\
  70.     gx_device_rop_texture, "gx_device_rop_texture",\
  71.     device_rop_texture_enum_ptrs, device_rop_texture_reloc_ptrs,\
  72.     gx_device_finalize)
  73.  
  74. /* Create a RasterOp source device. */
  75. int gx_alloc_rop_texture_device(P3(gx_device_rop_texture ** prsdev,
  76.                    gs_memory_t * mem,
  77.                    client_name_t cname));
  78.  
  79. /* Initialize a RasterOp source device. */
  80. void gx_make_rop_texture_device(P4(gx_device_rop_texture * rsdev,
  81.                    gx_device * target,
  82.                    gs_logical_operation_t lop,
  83.                    const gx_device_color * texture));
  84.  
  85. #endif /* gdevmrop_INCLUDED */
  86.